/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cn.ekuma.epos.servings.model;

import cn.ekuma.data.ui.swing.AbstractDTOTableModel;

import com.openbravo.bean.ServiceCalendarWeakLine;
import com.openbravo.pos.base.AppLocal;


/**
 *
 * @author Administrator
 */
public class ServiceCalendarWeakLineTableModel extends AbstractDTOTableModel<ServiceCalendarWeakLine>{

    @Override
    public String[] getColumnNames() {
        return new String[]{
                 AppLocal.getIntString("Label.service.dayofweek"),
                 AppLocal.getIntString("Label.StartDate"),
                 AppLocal.getIntString("Label.EndDate")
        };
    }

    public Object getValueAt(int rowIndex, int columnIndex) {
        ServiceCalendarWeakLine obj=this.getObj(rowIndex);
        switch(columnIndex){
            case 0: return obj.getDayInWeak();
            case 1: return obj.getStart();
            case 2: return obj.getEnd();
        }
        return null;
    }

}
